package com.thesis.manage.service.model;

/**
 * @author php
 * @date 2018/1/23
 */
public enum RoleEnum {
    TEACHER(1, "老师"),
    STUDENT(2, "学生"),
    ADMIN(3, "管理员"),
    LEADER(4, "领导"),
    GUIDETEACHER(5, "指导教师"),
    WRITER_PERSON(6, "记录员");
    private String name;
    private Integer value;

    RoleEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getName(Integer value) {
        switch (value) {
            case 1:
                return TEACHER.getName();
            case 2:
                return STUDENT.getName();
            case 3:
                return ADMIN.getName();
            case 4:
                return LEADER.getName();
            case 5:
                return GUIDETEACHER.getName();
            case 6:
                return WRITER_PERSON.getName();
            default:
                return "";
        }
    }

    public String getName() {
        return name;
    }

    public Integer getValue() {
        return value;
    }
}
